package com.aspose.cells;

class zboc {
   static int a(SparklineGroup var0) {
      if (b(var0, 4, 5)) {
         return 0;
      } else if (b(var0, 5, 6)) {
         return 1;
      } else if (b(var0, 6, 7)) {
         return 2;
      } else if (b(var0, 7, 8)) {
         return 3;
      } else if (b(var0, 8, 9)) {
         return 4;
      } else if (b(var0, 9, 4)) {
         return 5;
      } else if (d(var0, 4, 5)) {
         return 6;
      } else if (d(var0, 5, 6)) {
         return 7;
      } else if (d(var0, 6, 7)) {
         return 8;
      } else if (d(var0, 7, 8)) {
         return 9;
      } else if (d(var0, 8, 9)) {
         return 10;
      } else if (d(var0, 9, 4)) {
         return 11;
      } else if (f(var0, 4, 5)) {
         return 12;
      } else if (f(var0, 5, 6)) {
         return 13;
      } else if (f(var0, 6, 7)) {
         return 14;
      } else if (f(var0, 7, 8)) {
         return 15;
      } else if (f(var0, 8, 9)) {
         return 16;
      } else if (f(var0, 9, 4)) {
         return 17;
      } else if (h(var0, 4, 0)) {
         return 18;
      } else if (h(var0, 5, 0)) {
         return 19;
      } else if (h(var0, 6, 0)) {
         return 20;
      } else if (h(var0, 7, 0)) {
         return 21;
      } else if (h(var0, 8, 0)) {
         return 22;
      } else if (h(var0, 9, 0)) {
         return 23;
      } else if (c(var0)) {
         return 24;
      } else if (e(var0)) {
         return 25;
      } else if (b(var0, "FF323232", "FFD00000")) {
         return 26;
      } else if (b(var0, "FF000000", "FF0070C0")) {
         return 27;
      } else if (b(var0, "FF376092", "FFD00000")) {
         return 28;
      } else if (b(var0, "FF0070C0", "FF000000")) {
         return 29;
      } else if (b(var0, "FF5F5F5F", "FFFFB620", "FFD70077", "FF5687C2", "FF359CEB", "FF56BE79", "FFFF5055")) {
         return 30;
      } else if (b(var0, "FF5687C2", "FFFFB620", "FFD70077", "FF777777", "FF359CEB", "FF56BE79", "FFFF5055")) {
         return 31;
      } else if (b(var0, "FFC6EFCE", "FFFFC7CE", "FF8CADD6", "FFFFDC47", "FFFFEB9C", "FF60D276", "FFFF5367")) {
         return 32;
      } else if (b(var0, "FF00B050", "FFFF0000", "FF0070C0", "FFFFC000", "FFFFC000", "FF00B050", "FFFF0000")) {
         return 33;
      } else if (c(var0, 3)) {
         return 34;
      } else {
         return c(var0, 1) ? 35 : 36;
      }
   }

   static void a(SparklineGroup var0, int var1) {
      switch(var1) {
      case 0:
         a(var0, 4, 5);
         break;
      case 1:
         a(var0, 5, 6);
         break;
      case 2:
         a(var0, 6, 7);
         break;
      case 3:
         a(var0, 7, 8);
         break;
      case 4:
         a(var0, 8, 9);
         break;
      case 5:
         a(var0, 9, 4);
         break;
      case 6:
         c(var0, 4, 5);
         break;
      case 7:
         c(var0, 5, 6);
         break;
      case 8:
         c(var0, 6, 7);
         break;
      case 9:
         c(var0, 7, 8);
         break;
      case 10:
         c(var0, 8, 9);
         break;
      case 11:
         c(var0, 9, 4);
         break;
      case 12:
         e(var0, 4, 5);
         break;
      case 13:
         e(var0, 5, 6);
         break;
      case 14:
         e(var0, 6, 7);
         break;
      case 15:
         e(var0, 7, 8);
         break;
      case 16:
         e(var0, 8, 9);
         break;
      case 17:
         e(var0, 9, 4);
         break;
      case 18:
         g(var0, 4, 0);
         break;
      case 19:
         g(var0, 5, 0);
         break;
      case 20:
         g(var0, 6, 0);
         break;
      case 21:
         g(var0, 7, 0);
         break;
      case 22:
         g(var0, 8, 0);
         break;
      case 23:
         g(var0, 9, 0);
         break;
      case 24:
         b(var0);
         break;
      case 25:
         d(var0);
         break;
      case 26:
         a(var0, "FF323232", "FFD00000");
         break;
      case 27:
         a(var0, "FF000000", "FF0070C0");
         break;
      case 28:
         a(var0, "FF376092", "FFD00000");
         break;
      case 29:
         a(var0, "FF0070C0", "FF000000");
         break;
      case 30:
         a(var0, "FF5F5F5F", "FFFFB620", "FFD70077", "FF5687C2", "FF359CEB", "FF56BE79", "FFFF5055");
         break;
      case 31:
         a(var0, "FF5687C2", "FFFFB620", "FFD70077", "FF777777", "FF359CEB", "FF56BE79", "FFFF5055");
         break;
      case 32:
         a(var0, "FFC6EFCE", "FFFFC7CE", "FF8CADD6", "FFFFDC47", "FFFFEB9C", "FF60D276", "FFFF5367");
         break;
      case 33:
         a(var0, "FF00B050", "FFFF0000", "FF0070C0", "FFFFC000", "FFFFC000", "FF00B050", "FFFF0000");
         break;
      case 34:
         b(var0, 3);
         break;
      case 35:
         b(var0, 1);
      case 36:
      }

   }

   private static CellsColor a(Workbook var0, String var1, int var2, double var3) {
      zakp var5 = new zakp(false);
      if (var1 != null) {
         Color var6 = zase.t(var1);
         var5.a(2, var6.toArgb());
      } else {
         var5.a(4, var2);
      }

      if (var3 != 0.0D) {
         var5.a(var3);
      }

      CellsColor var7 = var0.createCellsColor();
      var7.a = var5;
      return var7;
   }

   private static boolean a(CellsColor var0, String var1, int var2, double var3) {
      zakp var5 = var0.a;
      if (var5.b() == 4) {
         if (var5.d() == var2 && Math.abs(var3 - var5.f()) < 1.0E-4D) {
            return true;
         }
      } else {
         String var6 = "FF" + zase.a(var0.getColor());
         if (var6.equals(var1) && Math.abs(var3 - var5.f()) < 1.0E-4D) {
            return true;
         }
      }

      return false;
   }

   private static void a(SparklineGroup var0, int var1, int var2) {
      Workbook var3 = var0.a().a().getWorkbook();
      var0.setSeriesColor(a((Workbook)var3, (String)null, var1, -0.499984740745262D));
      var0.setNegativePointsColor(a((Workbook)var3, (String)null, var2, 0.0D));
      var0.setHorizontalAxisColor(a((Workbook)var3, "FF000000", -1, 0.0D));
      var0.setMarkersColor(a((Workbook)var3, (String)null, var1, -0.499984740745262D));
      var0.setFirstPointColor(a((Workbook)var3, (String)null, var1, 0.3999755851924192D));
      var0.setLastPointColor(a((Workbook)var3, (String)null, var1, 0.3999755851924192D));
      var0.setHighPointColor(a((Workbook)var3, (String)null, var1, 0.0D));
      var0.setLowPointColor(a((Workbook)var3, (String)null, var1, 0.0D));
   }

   private static boolean b(SparklineGroup var0, int var1, int var2) {
      return a((CellsColor)var0.getSeriesColor(), (String)null, var1, -0.499984740745262D) && a((CellsColor)var0.getNegativePointsColor(), (String)null, var2, 0.0D) && a((CellsColor)var0.getHorizontalAxisColor(), "FF000000", -1, 0.0D) && a((CellsColor)var0.getMarkersColor(), (String)null, var1, -0.499984740745262D) && a((CellsColor)var0.getFirstPointColor(), (String)null, var1, 0.3999755851924192D) && a((CellsColor)var0.getLastPointColor(), (String)null, var1, 0.3999755851924192D) && a((CellsColor)var0.getHighPointColor(), (String)null, var1, 0.0D) && a((CellsColor)var0.getLowPointColor(), (String)null, var1, 0.0D);
   }

   private static void c(SparklineGroup var0, int var1, int var2) {
      Workbook var3 = var0.a().a().getWorkbook();
      var0.setSeriesColor(a((Workbook)var3, (String)null, var1, -0.249977111117893D));
      var0.setNegativePointsColor(a((Workbook)var3, (String)null, var2, 0.0D));
      var0.setHorizontalAxisColor(a((Workbook)var3, "FF000000", -1, 0.0D));
      var0.setMarkersColor(a((Workbook)var3, (String)null, var2, -0.249977111117893D));
      var0.setFirstPointColor(a((Workbook)var3, (String)null, var2, -0.249977111117893D));
      var0.setLastPointColor(a((Workbook)var3, (String)null, var2, -0.249977111117893D));
      var0.setHighPointColor(a((Workbook)var3, (String)null, var2, -0.249977111117893D));
      var0.setLowPointColor(a((Workbook)var3, (String)null, var2, -0.249977111117893D));
   }

   private static boolean d(SparklineGroup var0, int var1, int var2) {
      return a((CellsColor)var0.getSeriesColor(), (String)null, var1, -0.249977111117893D) && a((CellsColor)var0.getNegativePointsColor(), (String)null, var2, 0.0D) && a((CellsColor)var0.getHorizontalAxisColor(), "FF000000", -1, 0.0D) && a((CellsColor)var0.getMarkersColor(), (String)null, var2, -0.249977111117893D) && a((CellsColor)var0.getFirstPointColor(), (String)null, var2, -0.249977111117893D) && a((CellsColor)var0.getLastPointColor(), (String)null, var2, -0.249977111117893D) && a((CellsColor)var0.getHighPointColor(), (String)null, var2, -0.249977111117893D) && a((CellsColor)var0.getLowPointColor(), (String)null, var2, -0.249977111117893D);
   }

   private static void e(SparklineGroup var0, int var1, int var2) {
      Workbook var3 = var0.a().a().getWorkbook();
      var0.setSeriesColor(a((Workbook)var3, (String)null, var1, 0.0D));
      var0.setNegativePointsColor(a((Workbook)var3, (String)null, var2, 0.0D));
      var0.setHorizontalAxisColor(a((Workbook)var3, "FF000000", -1, 0.0D));
      var0.setMarkersColor(a((Workbook)var3, (String)null, var1, -0.249977111117893D));
      var0.setFirstPointColor(a((Workbook)var3, (String)null, var1, -0.249977111117893D));
      var0.setLastPointColor(a((Workbook)var3, (String)null, var1, -0.249977111117893D));
      var0.setHighPointColor(a((Workbook)var3, (String)null, var1, -0.249977111117893D));
      var0.setLowPointColor(a((Workbook)var3, (String)null, var1, -0.249977111117893D));
   }

   private static boolean f(SparklineGroup var0, int var1, int var2) {
      return a((CellsColor)var0.getSeriesColor(), (String)null, var1, 0.0D) && a((CellsColor)var0.getNegativePointsColor(), (String)null, var2, 0.0D) && a((CellsColor)var0.getHorizontalAxisColor(), "FF000000", -1, 0.0D) && a((CellsColor)var0.getMarkersColor(), (String)null, var1, -0.249977111117893D) && a((CellsColor)var0.getFirstPointColor(), (String)null, var1, -0.249977111117893D) && a((CellsColor)var0.getLastPointColor(), (String)null, var1, -0.249977111117893D) && a((CellsColor)var0.getHighPointColor(), (String)null, var1, -0.249977111117893D) && a((CellsColor)var0.getLowPointColor(), (String)null, var1, -0.249977111117893D);
   }

   private static void g(SparklineGroup var0, int var1, int var2) {
      Workbook var3 = var0.a().a().getWorkbook();
      var0.setSeriesColor(a((Workbook)var3, (String)null, var1, 0.3999755851924192D));
      var0.setNegativePointsColor(a((Workbook)var3, (String)null, var2, -0.499984740745262D));
      var0.setHorizontalAxisColor(a((Workbook)var3, "FF000000", -1, 0.0D));
      var0.setMarkersColor(a((Workbook)var3, (String)null, var1, 0.7999816888943144D));
      var0.setFirstPointColor(a((Workbook)var3, (String)null, var1, -0.249977111117893D));
      var0.setLastPointColor(a((Workbook)var3, (String)null, var1, -0.249977111117893D));
      var0.setHighPointColor(a((Workbook)var3, (String)null, var1, -0.499984740745262D));
      var0.setLowPointColor(a((Workbook)var3, (String)null, var1, -0.499984740745262D));
   }

   private static boolean h(SparklineGroup var0, int var1, int var2) {
      return a((CellsColor)var0.getSeriesColor(), (String)null, var1, 0.3999755851924192D) && a((CellsColor)var0.getNegativePointsColor(), (String)null, var2, -0.499984740745262D) && a((CellsColor)var0.getHorizontalAxisColor(), "FF000000", -1, 0.0D) && a((CellsColor)var0.getMarkersColor(), (String)null, var1, 0.7999816888943144D) && a((CellsColor)var0.getFirstPointColor(), (String)null, var1, -0.249977111117893D) && a((CellsColor)var0.getLastPointColor(), (String)null, var1, -0.249977111117893D) && a((CellsColor)var0.getHighPointColor(), (String)null, var1, -0.499984740745262D) && a((CellsColor)var0.getLowPointColor(), (String)null, var1, -0.499984740745262D);
   }

   private static void b(SparklineGroup var0) {
      Workbook var1 = var0.a().a().getWorkbook();
      var0.setSeriesColor(a((Workbook)var1, (String)null, 1, 0.499984740745262D));
      var0.setNegativePointsColor(a((Workbook)var1, (String)null, 1, 0.249977111117893D));
      var0.setHorizontalAxisColor(a((Workbook)var1, "FF000000", -1, 0.0D));
      var0.setMarkersColor(a((Workbook)var1, (String)null, 1, 0.249977111117893D));
      var0.setFirstPointColor(a((Workbook)var1, (String)null, 1, 0.249977111117893D));
      var0.setLastPointColor(a((Workbook)var1, (String)null, 1, 0.249977111117893D));
      var0.setHighPointColor(a((Workbook)var1, (String)null, 1, 0.249977111117893D));
      var0.setLowPointColor(a((Workbook)var1, (String)null, 1, 0.249977111117893D));
   }

   private static boolean c(SparklineGroup var0) {
      return a((CellsColor)var0.getSeriesColor(), (String)null, 1, 0.499984740745262D) && a((CellsColor)var0.getNegativePointsColor(), (String)null, 1, 0.249977111117893D) && a((CellsColor)var0.getHorizontalAxisColor(), "FF000000", -1, 0.0D) && a((CellsColor)var0.getMarkersColor(), (String)null, 1, 0.249977111117893D) && a((CellsColor)var0.getFirstPointColor(), (String)null, 1, 0.249977111117893D) && a((CellsColor)var0.getLastPointColor(), (String)null, 1, 0.249977111117893D) && a((CellsColor)var0.getHighPointColor(), (String)null, 1, 0.249977111117893D) && a((CellsColor)var0.getLowPointColor(), (String)null, 1, 0.249977111117893D);
   }

   private static void d(SparklineGroup var0) {
      Workbook var1 = var0.a().a().getWorkbook();
      var0.setSeriesColor(a((Workbook)var1, (String)null, 1, 0.3499862666707358D));
      var0.setNegativePointsColor(a((Workbook)var1, (String)null, 0, -0.249977111117893D));
      var0.setHorizontalAxisColor(a((Workbook)var1, "FF000000", -1, 0.0D));
      var0.setMarkersColor(a((Workbook)var1, (String)null, 0, -0.249977111117893D));
      var0.setFirstPointColor(a((Workbook)var1, (String)null, 0, -0.249977111117893D));
      var0.setLastPointColor(a((Workbook)var1, (String)null, 0, -0.249977111117893D));
      var0.setHighPointColor(a((Workbook)var1, (String)null, 0, -0.249977111117893D));
      var0.setLowPointColor(a((Workbook)var1, (String)null, 0, -0.249977111117893D));
   }

   private static boolean e(SparklineGroup var0) {
      return a((CellsColor)var0.getSeriesColor(), (String)null, 1, 0.3499862666707358D) && a((CellsColor)var0.getNegativePointsColor(), (String)null, 0, -0.249977111117893D) && a((CellsColor)var0.getHorizontalAxisColor(), "FF000000", -1, 0.0D) && a((CellsColor)var0.getMarkersColor(), (String)null, 0, -0.249977111117893D) && a((CellsColor)var0.getFirstPointColor(), (String)null, 0, -0.249977111117893D) && a((CellsColor)var0.getLastPointColor(), (String)null, 0, -0.249977111117893D) && a((CellsColor)var0.getHighPointColor(), (String)null, 0, -0.249977111117893D) && a((CellsColor)var0.getLowPointColor(), (String)null, 0, -0.249977111117893D);
   }

   private static void a(SparklineGroup var0, String var1, String var2) {
      Workbook var3 = var0.a().a().getWorkbook();
      var0.setSeriesColor(a((Workbook)var3, var1, -1, 0.0D));
      var0.setNegativePointsColor(a((Workbook)var3, var2, -1, 0.0D));
      var0.setHorizontalAxisColor(a((Workbook)var3, "FF000000", -1, 0.0D));
      var0.setMarkersColor(a((Workbook)var3, var2, -1, 0.0D));
      var0.setFirstPointColor(a((Workbook)var3, var2, -1, 0.0D));
      var0.setLastPointColor(a((Workbook)var3, var2, -1, 0.0D));
      var0.setHighPointColor(a((Workbook)var3, var2, -1, 0.0D));
      var0.setLowPointColor(a((Workbook)var3, var2, -1, 0.0D));
   }

   private static boolean b(SparklineGroup var0, String var1, String var2) {
      return a((CellsColor)var0.getSeriesColor(), var1, -1, 0.0D) && a((CellsColor)var0.getNegativePointsColor(), var2, -1, 0.0D) && a((CellsColor)var0.getHorizontalAxisColor(), "FF000000", -1, 0.0D) && a((CellsColor)var0.getMarkersColor(), var2, -1, 0.0D) && a((CellsColor)var0.getFirstPointColor(), var2, -1, 0.0D) && a((CellsColor)var0.getLastPointColor(), var2, -1, 0.0D) && a((CellsColor)var0.getHighPointColor(), var2, -1, 0.0D) && a((CellsColor)var0.getLowPointColor(), var2, -1, 0.0D);
   }

   private static void a(SparklineGroup var0, String var1, String var2, String var3, String var4, String var5, String var6, String var7) {
      Workbook var8 = var0.a().a().getWorkbook();
      var0.setSeriesColor(a((Workbook)var8, var1, -1, 0.0D));
      var0.setNegativePointsColor(a((Workbook)var8, var2, -1, 0.0D));
      var0.setHorizontalAxisColor(a((Workbook)var8, "FF000000", -1, 0.0D));
      var0.setMarkersColor(a((Workbook)var8, var3, -1, 0.0D));
      var0.setFirstPointColor(a((Workbook)var8, var4, -1, 0.0D));
      var0.setLastPointColor(a((Workbook)var8, var5, -1, 0.0D));
      var0.setHighPointColor(a((Workbook)var8, var6, -1, 0.0D));
      var0.setLowPointColor(a((Workbook)var8, var7, -1, 0.0D));
   }

   private static boolean b(SparklineGroup var0, String var1, String var2, String var3, String var4, String var5, String var6, String var7) {
      return a((CellsColor)var0.getSeriesColor(), var1, -1, 0.0D) && a((CellsColor)var0.getNegativePointsColor(), var2, -1, 0.0D) && a((CellsColor)var0.getHorizontalAxisColor(), "FF000000", -1, 0.0D) && a((CellsColor)var0.getMarkersColor(), var3, -1, 0.0D) && a((CellsColor)var0.getFirstPointColor(), var4, -1, 0.0D) && a((CellsColor)var0.getLastPointColor(), var5, -1, 0.0D) && a((CellsColor)var0.getHighPointColor(), var6, -1, 0.0D) && a((CellsColor)var0.getLowPointColor(), var7, -1, 0.0D);
   }

   private static void b(SparklineGroup var0, int var1) {
      Workbook var2 = var0.a().a().getWorkbook();
      var0.setSeriesColor(a((Workbook)var2, (String)null, var1, 0.0D));
      var0.setNegativePointsColor(a((Workbook)var2, (String)null, 9, 0.0D));
      var0.setHorizontalAxisColor(a((Workbook)var2, "FF000000", -1, 0.0D));
      var0.setMarkersColor(a((Workbook)var2, (String)null, 8, 0.0D));
      var0.setFirstPointColor(a((Workbook)var2, (String)null, 4, 0.0D));
      var0.setLastPointColor(a((Workbook)var2, (String)null, 5, 0.0D));
      var0.setHighPointColor(a((Workbook)var2, (String)null, 6, 0.0D));
      var0.setLowPointColor(a((Workbook)var2, (String)null, 7, 0.0D));
   }

   private static boolean c(SparklineGroup var0, int var1) {
      return a((CellsColor)var0.getSeriesColor(), (String)null, var1, 0.0D) && a((CellsColor)var0.getNegativePointsColor(), (String)null, 9, 0.0D) && a((CellsColor)var0.getHorizontalAxisColor(), "FF000000", -1, 0.0D) && a((CellsColor)var0.getMarkersColor(), (String)null, 8, 0.0D) && a((CellsColor)var0.getFirstPointColor(), (String)null, 4, 0.0D) && a((CellsColor)var0.getLastPointColor(), (String)null, 5, 0.0D) && a((CellsColor)var0.getHighPointColor(), (String)null, 6, 0.0D) && a((CellsColor)var0.getLowPointColor(), (String)null, 7, 0.0D);
   }
}
